package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IAdvancedTaskModel;
import com.wgts.wgts.mvp.model.IShopKeepFragmentModel;
import com.wgts.wgts.mvp.model.imp.AdvancedTaskModel;
import com.wgts.wgts.mvp.model.imp.ShopKeepFragmentModel;
import com.wgts.wgts.mvp.presenter.IShopKeepFragmentPersenter;
import com.wgts.wgts.mvp.presenter.imp.ShopKeepFragmentPersenter;
import com.wgts.wgts.mvp.view.IShopKeepFragmentView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class ShopKeepFragmentModule {
    private IShopKeepFragmentView view;

    public ShopKeepFragmentModule(IShopKeepFragmentView view) {
        this.view = view;
    }

    @Provides
    @FragmentScope
    public IShopKeepFragmentView provideView(){
        return view;
    }

    @Provides
    @FragmentScope
    public IShopKeepFragmentModel provideModel(NetService netService){
        return new ShopKeepFragmentModel(netService);
    }

    @Provides
    @FragmentScope
    public IAdvancedTaskModel provideAdvanceModel(NetService netService){
        return new AdvancedTaskModel(netService);
    }

    @Provides
    @FragmentScope
    public IShopKeepFragmentPersenter providePersenter(IShopKeepFragmentModel model, IShopKeepFragmentView view, IAdvancedTaskModel advancedTaskModel){
        return new ShopKeepFragmentPersenter(model, view, advancedTaskModel);
    }
}
